let sm = new Vue({
    el: '#show-more',
    data: {
        show: JSON.parse(localStorage.getItem("show")),
        seats: [],
        yes:'',
        no:''
    },
    created() {
        $("#showId").text("放映编号："+this.show.showId);
        $("#filmName").text("放映片："+"《"+this.show.filmName+"》");
        $("#hallName").text("放映厅："+this.show.hallName);

        let formData = {
            showId: this.show.showId,
            status:2
        }

        let formData2 = {
            showId: this.show.showId,
            status:0
        }

        // 查询所有座位
        $.get('http://localhost:8080/cinema/api/SelectSeatsByShowIdServlet.do', formData, function (dto) {
            sm.seats = dto.value;

        });

        // 查询已售座位
        $.get('http://localhost:8080/cinema/api/SelectSeatConditionServlet.do', formData, function (dto) {
            sm.yes=dto.value.length;
        });

        // 查询未售座位
        $.get('http://localhost:8080/cinema/api/SelectSeatConditionServlet.do', formData2, function (dto) {
            sm.no=dto.value.length;
        });

    }
});